<template>
  <div class="app-container">
    <div class="text-555 mb20">预申报明细</div>
    <el-row :gutter="20">
      <!--用户数据-->
      <el-col :span="24" :xs="24">
        <el-table v-loading="loading" :data="predeclareDataDetailList">
          <el-table-column fixed label="序号" prop="" width="55" align="center">
            <template slot-scope="scope">
              <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
            </template>
          </el-table-column>
          <el-table-column label="姓名" align="left" key="realName" prop="realName"/>
          <el-table-column label="证件号" align="left" key="idNumber" prop="idNumber" />
          <el-table-column label="申报日期" align="left" key="months" prop="months" />
          <el-table-column label="税号/临登号" align="left" key="taxNo" prop="taxNo" />
          <el-table-column label="申报金额" align="left" key="money" prop="money" />
          <el-table-column label="完税状态" align="left" key="declareStatus.name" prop="declareStatus.name" />
          <el-table-column label="所属客户企业" align="left" key="companyName" prop="companyName" width="300"/>
          <el-table-column label="管理企业" align="left" key="companyAdminName" prop="companyAdminName" width="350"/>
        </el-table>
        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { predeclareDataDetailList } from "@/api/taxmsg/predeclareDetails";
export default {
  name: "PredeclareDetails2",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      // 用户表格数据
      predeclareDataDetailList: null,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        declareId: this.$route.params && this.$route.params.id
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询用户列表 */
    getList() {
      this.loading = true;
      predeclareDataDetailList(this.queryParams).then(response => {
          this.predeclareDataDetailList = response.data.list;
          this.total = response.data.total;
          this.loading = false;
        }
      );
    }
  }
};
</script>
<style scoped lang="scss">
</style>